package ee.siimoliver.chat.controllers;

import java.io.IOException;
import java.util.ArrayList;

import ee.siimoliver.chat.GUI.LoadingFrame;
import ee.siimoliver.chat.server.ChatMate;

public interface BusinessLogicController {

	public ArrayList<ChatSessionController> getChatSessions();
	
	public ChatSessionController startNewChatSession(String name, String ipPort);
	
	public ChatSessionController startNewChatSession(ArrayList<ChatMate> chatmates);
	
	public void killChatSession(ChatSessionController chatSession);
	
	public boolean checkName(LoadingFrame loadingFrame, String name) throws Exception;
	
	public void searchChatmates(LoadingFrame loadingFrame) throws Exception;
	
	public String searchChatmate(LoadingFrame loadingFrame, String name) throws Exception;
	
	public void stopServer();
	
	public void restartServer() throws IOException;
	
	public void startServer();
	
	public boolean isServerRunning();
}
